import request from "@/utils/request";

// 查询标签列表
export function listCategory(query) {
  return request({
    url: "/category/list",
    method: "get",
    params: query,
  });
}

// 查询标签列表
export function listCategoryByPage(query) {
  return request({
    url: "/category/list/page",
    method: "get",
    params: query,
  });
}

// 查询标签详细
export function getCategory(query) {
  return request({
    url: "/category/get",
    method: "get",
    params: query,
  });
}

// 新增标签
export function addCategory(data) {
  return request({
    url: "/category/add",
    method: "post",
    data: data,
  });
}

// 修改参数配置
export function updateCategory(data) {
  return request({
    url: "/category/update",
    method: "post",
    data: data,
  });
}

// 删除参数配置
export function delCategory(categoryId) {
  return request({
    url: "/category/" + categoryId,
    method: "delete",
  });
}
